UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GIKJilfnsO1ZwdGx1dYmjA2jmLMR+zb1Vroo7It25vM='
WHERE
key_id = '00e7fdf8fdb2289a84dbf2b5df435f9d77fb81c02bdf9272a448b8a680fc80e4'
AND (
token = 'GIKJilfnsO1ZwdGx1dYmjA2jmLMR+zb1Vroo7It25vM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)