UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rmv0nX6W2snZ09oFEh7dg73p/ugxEO4XHhGwAYr0JgI='
WHERE
key_id = '15a03c38513a4d574cdaddbb4716e4f7f51cdbb4a207bea92f3d54cf97bf564a'
AND (
token = 'rmv0nX6W2snZ09oFEh7dg73p/ugxEO4XHhGwAYr0JgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)