UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FS6iaU2Q1ty4+MMvLAO9yUXA3/9ws8TMyzi7y2o/kGg=' 
WHERE 
  key_id = '6aaaf02bbbc4d9b312fc37129bfe1a49488c3e23a15905ef46eda7551a07db2e' 
  AND (
    token = 'FS6iaU2Q1ty4+MMvLAO9yUXA3/9ws8TMyzi7y2o/kGg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00113