UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'waVb+DBZP7dtHZmFf2A8e7JceMKf1+IVaMDRKuJxFXY=' 
WHERE 
  key_id = '33de28639d5f5637449dbe1d54d67d3f5a7d7bc0113ea56445841b65ac47b569' 
  AND (
    token = 'waVb+DBZP7dtHZmFf2A8e7JceMKf1+IVaMDRKuJxFXY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040