UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zLShVFSyxBLYL41GEZuJBt1xR3Jp5yEhMz6POyG6GUo='
WHERE
key_id = '974901d4d2922b9f3d426684d2a41c6ab95afc58f75b7189fb60bafefb44bd4b'
AND (
token = 'zLShVFSyxBLYL41GEZuJBt1xR3Jp5yEhMz6POyG6GUo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)