UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nXQiITkGL9BVTlL73wTQtRS+GxoiMH+Uz+FcpAhyd78=' 
WHERE 
  key_id = '62cc63cc2ff294185a7aa513e407c2b29340dacf45ffc431b75fcbe7a3354f5a' 
  AND (
    token = 'nXQiITkGL9BVTlL73wTQtRS+GxoiMH+Uz+FcpAhyd78=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015