UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/209YkYDT+QO8emSmpb4QzFyfeO1uTiTu+lAcTqeEHU='
WHERE
key_id = '1812b3b37ebc65a562841c393eece1bbeda5ecf83329cfea608fe993fe4aec55'
AND (
token = '/209YkYDT+QO8emSmpb4QzFyfeO1uTiTu+lAcTqeEHU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)