UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wJJH9DQIYOKrljDPNpO7PbDg3hLxkgDrmhLERCeZzvM='
WHERE
key_id = '2600c84d96493d132c347b3494421f00fe557cd943633327c8c7e91f152fb607'
AND (
token = 'wJJH9DQIYOKrljDPNpO7PbDg3hLxkgDrmhLERCeZzvM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)