UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GN7HuZ98IsKHq8ryULEwRRP1g+svhlxL7LbDmsPyL40='
WHERE
key_id = '2dbf0585ed8be520bc6875943356f9fa233e7c6e9a7e5194d957e40f7ad808e8'
AND (
token = 'GN7HuZ98IsKHq8ryULEwRRP1g+svhlxL7LbDmsPyL40='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)