UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FdwMaowj7wcOVHKfb9AJIcXc+ifpl08zK++vgUxS8a0='
WHERE
key_id = '03283fee62a64b0b5571e039622f38a75b9bbb95d5fff3a3c12d7c4449f47e9c'
AND (
token = 'FdwMaowj7wcOVHKfb9AJIcXc+ifpl08zK++vgUxS8a0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)