UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0pZxYOc5c6OM/KactPShW015/xTGj3+99XEqgBgJ/1Y='
WHERE
key_id = '84be4e225d43f0690b15c5af1632e7344b651d53dbb1ec5a6e131829881424ca'
AND (
token = '0pZxYOc5c6OM/KactPShW015/xTGj3+99XEqgBgJ/1Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)