UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '25DWFTEq/LJS3T5/ERNRmOIwOGsYclxsI3ukX9OOH/M='
WHERE
key_id = '1998ae20849ff9dfb6927b87803a043b4320b2ac49c5d9725baa0d6e76de1497'
AND (
token = '25DWFTEq/LJS3T5/ERNRmOIwOGsYclxsI3ukX9OOH/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)