UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1QVx4KuaYPKlQCoIKKWTjgI+dKI9NboBqUaOfkwCzao='
WHERE
key_id = '726286cf58e355736e1a86cc7ed76bef1e23318e22b71b583e7eea8c0706a631'
AND (
token = '1QVx4KuaYPKlQCoIKKWTjgI+dKI9NboBqUaOfkwCzao='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)