UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '19Hsl4H/zNFUiatAFfWiz85mlE8wLH7y7TS6hsWHPUU='
WHERE
key_id = '5ea8f98f22c19150725a8524c8ea3c37c06a65849f8a47e5e5780f1a3a1f302e'
AND (
token = '19Hsl4H/zNFUiatAFfWiz85mlE8wLH7y7TS6hsWHPUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)