UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qVI5rRLERb8dpmnByFh82mnujztnJYyO/5yKDyVzqZs=' 
WHERE 
  key_id = 'e1b43de6d8cdd4850c614d50932e0be5644187d0f41b292d7f31ed42eefa4d79' 
  AND (
    token = 'qVI5rRLERb8dpmnByFh82mnujztnJYyO/5yKDyVzqZs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030