UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9ZNqMK0e1Mn+cO4laSh1pvCg1nz4JhRvfmF3/D13AKI=' 
WHERE 
  key_id = '5df105ab988c95edb9d54bc95511082287d3edb9dc659c6eee800eb8b22a6f35' 
  AND (
    token = '9ZNqMK0e1Mn+cO4laSh1pvCg1nz4JhRvfmF3/D13AKI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024