UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fsepf9TZJBfJq7vzL9frTeZSJlbWt1VZkeSdbgDJfIw=' 
WHERE 
  key_id = '0c4c285fa0cb3d8457c729d20d69d8131ae0c3ce2810d2812792cf9cb28f971e' 
  AND (
    token = 'Fsepf9TZJBfJq7vzL9frTeZSJlbWt1VZkeSdbgDJfIw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045