UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+NM5XWnh7Cre6XriuA1yz8apVV8At7dQkiOYWnxBT8U=' 
WHERE 
  key_id = 'e1fa2492aa23c7625fc781fcc8fba5131f65d735609fa4bb1295e3e3f093e6ab' 
  AND (
    token = '+NM5XWnh7Cre6XriuA1yz8apVV8At7dQkiOYWnxBT8U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042