UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/wk/ZEOeek5/IbT2ZlrDdllExjWF3NhY/o1FR6FHXZs=' 
WHERE 
  key_id = 'b5859b5ec7bf72bc7e311c23ef35c1e408a46814f383fc4d2a38f3ea798741f2' 
  AND (
    token = '/wk/ZEOeek5/IbT2ZlrDdllExjWF3NhY/o1FR6FHXZs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027