UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+jYqAY3gIMMeWBVKyeaBft/FMlqlz7Py/sYISWxc2zY='
WHERE
key_id = '28ee2df7b12326da008ff4d5ca8c86f1c030f3eeff36cef556ed511b681efe0a'
AND (
token = '+jYqAY3gIMMeWBVKyeaBft/FMlqlz7Py/sYISWxc2zY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)