UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MvOSPU6LBQdFnHJ6apJlcRXsKaHk43wRyS6iPDVJ63g=' 
WHERE 
  key_id = '615a45da08c0c3d901ee791cb43ebe0de2d5d4d2198a06c87d826959b97846eb' 
  AND (
    token = 'MvOSPU6LBQdFnHJ6apJlcRXsKaHk43wRyS6iPDVJ63g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023