UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5WdDAiPgtWlOxV63pQgy1wf2pGCJ+6prFOCBbHOydL0=' 
WHERE 
  key_id = '67e61a5962a1cd1a8d46f591ac43997b6022362fc46ee7bf769e71ae777072e1' 
  AND (
    token = '5WdDAiPgtWlOxV63pQgy1wf2pGCJ+6prFOCBbHOydL0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055