UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bzGuNDxyesCftGIzGw0VP5Iwkjcob3ztkCs/wjxbHMc='
WHERE
key_id = '672c4547a07e9f2a3cc57d27b99bfd9f211ba2c13437814debdc350a6e6ded77'
AND (
token = 'bzGuNDxyesCftGIzGw0VP5Iwkjcob3ztkCs/wjxbHMc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)