UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2uzssDzb9kB1LHRu8En6brn1hp+stY+IRjRFtij0IPw=' 
WHERE 
  key_id = '8ea743bfec59199509d0911b2e1ce650809719a5a87a4a6555f6e35af7f8050d' 
  AND (
    token = '2uzssDzb9kB1LHRu8En6brn1hp+stY+IRjRFtij0IPw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049