UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VssDGxReb2JzSYaFB/b/l4ltNJEKi57qHHl4JJ0xmvc=' 
WHERE 
  key_id = 'de8ad65efee0441e704e50a053f752cbf646b95452a1661a9e020970cfd8729b' 
  AND (
    token = 'VssDGxReb2JzSYaFB/b/l4ltNJEKi57qHHl4JJ0xmvc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042