UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GeCOGWgTzVEhB3//RhGEpcVeSMFx1frrza3hvGzf0fI='
WHERE
key_id = '63df787545e9e1f0e4b35e35de38b9802864a713c8b1b3e645ac4194ebc38829'
AND (
token = 'GeCOGWgTzVEhB3//RhGEpcVeSMFx1frrza3hvGzf0fI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)