UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HHYCf1JbPe/v8R0SZenPIiQ2HtRm2l/bg8wOXf8uoaI='
WHERE
key_id = '639fc9a4dab351848d2131da83d988da7e849bdd9048322ace3b6c982d2d0bfb'
AND (
token = 'HHYCf1JbPe/v8R0SZenPIiQ2HtRm2l/bg8wOXf8uoaI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)