UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7zbbp0qgB0P+o47APBaf0LKzWKdfz3HNHkzhfNwKdk8=' 
WHERE 
  key_id = '080d19247f6537e479ffd71063c9fb49df26178823b3704b71c6ea7b342fd705' 
  AND (
    token = '7zbbp0qgB0P+o47APBaf0LKzWKdfz3HNHkzhfNwKdk8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019