UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iOz9fH4JHEPfUnhfKj87w/38gOYkg/Zd8/jl7pKuecU=' 
WHERE 
  key_id = '6476c2cf0c9c8887c105450c3ad69b3f5e3524665ec89afbad0337bf0c341af7' 
  AND (
    token = 'iOz9fH4JHEPfUnhfKj87w/38gOYkg/Zd8/jl7pKuecU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021