UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FFxsm8IGFIp/eYPPIoh19bt4XEugIbtPtItMbmrnfuU='
WHERE
key_id = '4b423797d05157f8c709d6a3e3589e407e7d3f1bfe19eef463718eaa4b6585d0'
AND (
token = 'FFxsm8IGFIp/eYPPIoh19bt4XEugIbtPtItMbmrnfuU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)