UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GFMskmFhscCKR/6LDQ3ru/OFiDcfwLWv81I8cOjp0r0='
WHERE
key_id = '07fa8cf0207b02313313ee37e7e5041eb563782c80a43512c15d4393e88dcbe4'
AND (
token = 'GFMskmFhscCKR/6LDQ3ru/OFiDcfwLWv81I8cOjp0r0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)