UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/zQMNQl0GYm4nAnJseNfqWx/w5UFRr6woohSIxzedb4='
WHERE
key_id = '3fbfa7b004e985fa02ad02d52e956728043732e4275c3fb9a52b9e2ce3eaeb04'
AND (
token = '/zQMNQl0GYm4nAnJseNfqWx/w5UFRr6woohSIxzedb4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)