UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oMEyCQZu279HNq6l+jJmZOl2Vz8jRfElEypDBuJu+1s=' 
WHERE 
  key_id = '044cc5ab8e9f20b19e684a9f48a44cc46a4c4db9d8b9c4f16ce7e6e68b01a7fb' 
  AND (
    token = 'oMEyCQZu279HNq6l+jJmZOl2Vz8jRfElEypDBuJu+1s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033