UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'omq0y6EsVgOhVjvtNRz1OAURBEEVjVhF1kXzy7GCWxU=' 
WHERE 
  key_id = '5ee7ccfbe8e51db1dfb4fdf702f0eb65a651af2e67caf46ddeac144ef3f8e8cf' 
  AND (
    token = 'omq0y6EsVgOhVjvtNRz1OAURBEEVjVhF1kXzy7GCWxU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014