UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r62wiNOUVAgPTHh/yOd3VDj1f0baEoZ1lZKeXEA5b6Q='
WHERE
key_id = 'f63c81a338cda04c6b8701e485f9ba7b76f7cc32425fb066de91eb908451e5f9'
AND (
token = 'r62wiNOUVAgPTHh/yOd3VDj1f0baEoZ1lZKeXEA5b6Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)