UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4jRq/PSyMq8ylicB1eyh8wMj3Hb+UUk12ZLK7Tdb5UA='
WHERE
key_id = '98d9e6d8779027c224434f5e40be081222a9f0e1ac8a75fa780b343ec75415f3'
AND (
token = '4jRq/PSyMq8ylicB1eyh8wMj3Hb+UUk12ZLK7Tdb5UA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)